import StatusBar from '../index.js'

class NetworkStatus extends StatusBar {
  constructor(node) {
    super(node)
    this.node = node
  }
  //渲染item显示内容
  renderItem(params) {
    let dom = ''
    if (params.connected) {
      dom += `<i class="platformicon iconicon_wangsu networkLevel${params.level}"></i>
                    <p class="networkLevel${params.level}">${params.speed}${params.unit}</p>`
    } else {
      dom += `<i class="iconfont iconzhongzhi_wangluocuowu networkLevel${params.level}"></i>`
    }
    return dom
  }
  itemClick() {
    app.envServer.setNetWorkOption('systemCheck')
  }
}
export default NetworkStatus
